Skip to main content

Model Class

Description:

  A class for creating instances of the 'Model' record.

dummy

Type: Function.

Description:

  A method that returns a new dummy instance of 'Model' that can do nothing.

Signature:

dummy: function(self: ModelClass): Model

Returns:

Return TypeDescription
Modela new dummy instance of 'Model'.

getClipFile

Type: Function.

Description:

  Gets the clip file from the specified model file.

Signature:

getClipFile: function(self: ModelClass, filename: string): string

Parameters:

ParameterTypeDescription
filenamestringThe filename of the model file to search.

Returns:

Return TypeDescription
stringThe name of the clip file.

getLooks

Type: Function.

Description:

  Gets an array of look names from the specified model file.

Signature:

getLooks: function(self: ModelClass, filename: string): {string}

Parameters:

ParameterTypeDescription
filenamestringThe filename of the model file to search.

Returns:

Return TypeDescription
{string}An array of look names found in the model file.

getAnimations

Type: Function.

Description:

  Gets an array of animation names from the specified model file.

Signature:

getAnimations: function(self: ModelClass, filename: string): {string}

Parameters:

ParameterTypeDescription
filenamestringThe filename of the model file to search.

Returns:

Return TypeDescription
{string}An array of animation names found in the model file.

__call

Type: Metamethod.

Description:

  Creates a new instance of 'Model' from the specified model file.

Signature:

metamethod __call: function(self: ModelClass, filename: string): Model

Parameters:

ParameterTypeDescription
filenamestringThe filename of the model file to load.Can be filename with or without extension like: "Model/item" or "Model/item.model".

Returns:

Return TypeDescription
Modela new instance of 'Model'.